<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Permission extends Model
{
    protected $table = 'hawk_permission';

    protected $fillable = ['name', 'slug', 'description', 'addTime'];

    const CREATED_AT = 'addTime';
    const UPDATED_AT = null;

    protected $dateFormat = 'U';

    const SLUG_REAL_TIME_MONITORING = 'real_time_monitoring';
    const SLUG_LOSS_ANALYZE = 'loss_analyze';
    const SLUG_STATISTICAL_REPORT = 'statistical_report';
    const SLUG_PRODUCE_PLAN = 'produce_plan';

    public static $defaults = [
        self::SLUG_REAL_TIME_MONITORING => ['name' => '实时监控'],
        self::SLUG_LOSS_ANALYZE => ['name' => '损失分析'],
        self::SLUG_STATISTICAL_REPORT => ['name' => '统计报表'],
        self::SLUG_PRODUCE_PLAN => ['name' => '生产计划'],
    ];

    public static function boot()
    {
        parent::boot(); // TODO: Change the autogenerated stub

    }


}
